﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Microsoft.Web.Mvc"%>
<asp:Content ID="paymentHead" ContentPlaceHolderID="head" runat="server">
    <title>Giỏ Hàng</title>
</asp:Content>
<asp:Content ID="css_js" ContentPlaceHolderID="js_css" runat="server">
    <script type="text/javascript" src="/scripts/jquery-1.4.2.min.js"></script>
</asp:Content>
<asp:Content ID="paymentContentLeft" ContentPlaceHolderID="left_content" runat="server">
       <div class="title"><span class="title_icon"><img src="/content/images/bullet1.gif" alt="" title="" /></span>Thanh Toán</div>
        	<div class="feat_prod_box_details">				
              	<div class="contact_form">
                <div class="form_subtitle">Bạn Đã Mua Thành Công Đơn Hàng</div>     
					
                    <div class="form_row">
                    <label class="contact" style="width:110px;"><strong>Số Lượng Sách :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><strong><% = ViewData["quantity"] %></strong></label>
                    </div>  
                    
                    <div class="form_row">
                    <label class="contact"style="width:110px;"><strong>Tổng Giá Trị Sách :</strong></label>
                    <label class="contact" style=" width:150px; color:#A53D17;margin-left:30px;text-align:left"><strong><% = ViewData["total_price"] %> VNĐ</strong></label>
                    </div> 
                    
                    <% if (ViewData["deposit"] != null)
                       { %>
                         <div class="form_row">
                            <label class="contact"  style="width:110px;"><strong>Đặt Cọc :</strong></label>
                              <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><strong><% = ViewData["deposit"] %> VNĐ</strong></label>
                        </div> 
                    <% } %>
                     <div class="form_row">
                    <% string[] shipping = (string[])ViewData["shipping"]; %>
                    <label class="contact"  style="width:110px;"><strong>Tiền Vận Chuyển :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><strong><% = shipping[2] %> VNĐ</strong></label>
                    </div> 
                    
                    <div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Tổng Tiền :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = ViewData["total_bill"] %> VNĐ</label>
                    </div> 
                    
                    <% string[] shipping_detail = (string[])ViewData["shipping_detail"]; %>
                    <div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Tên người nhận :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = shipping_detail[1] %></label>
                    </div>  

                    <div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Email :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = shipping_detail[4] %></label>
                    </div>


                    <div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Số Điện Thoại :</strong></label>
                    <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = shipping_detail[3] %></label>
                    </div>
                    
                    <div class="form_row">
                    <label class="contact" style="width:110px;"><strong>Địa Chỉ :</strong></label>
                     <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = shipping_detail[2] %></label>
                    </div>
                    
                    <% string[] payment = (string[])ViewData["payment"]; %>
                    <div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Cách giao hàng :</strong></label>
				      <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = shipping[1] %></label>
                    </div>
             
            		<div class="form_row">
                    <label class="contact"  style="width:110px;"><strong>Cách thanh toán :</strong></label>
                   <label class="contact" style="width:150px;color:#A53D17;margin-left:30px;text-align:left"><% = payment[1] %> </label>
                    <br />
      				<a href="/home/index" class="continue">Kết Thúc</a>
                    </div>           
                </div>
                </div>  
                <script type="text/javascript">
     function checkValidate() {
         if (document.getElementById("name").value == "") {
             alert('Vui lòng nhập tên người nhận');
             document.getElementById("name").focus();
             return false;
         }
         else if (document.getElementById("email").value == "") {
             alert('Vui lòng nhập email');
             document.getElementById("email").focus();
             return false;
         }
         else if (checkEmail(document.getElementById("email").value) != true) {
             alert('Email không hợp lệ');
             document.getElementById("email").focus();
             return false;
         }
         else if (document.getElementById("phone").value == "" || isNaN(document.getElementById("phone").value)) {
             alert("Số điện thoại chưa nhập hoặc chưa chính xác");
             document.getElementById("phone").focus();
             return false;
         }
         else if (document.getElementById("address").value == "") {
             alert('Bạn phải nhập địa chỉ');
             document.getElementById("address").focus();
             return false;
         }
         else {
                return true; 
            }
         
     }
     function checkEmail(value) {
         if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(value))
             return true;
         else
             return false;
     }

</script>     
 <script type="text/javascript" src="/scripts/jquery.min.js"></script>  
</asp:Content>

<asp:Content ID="paymentContentRight" ContentPlaceHolderID="right_content" runat="server">
   <% Html.RenderAction("index","sidebar"); %>
</asp:Content>
